package jcommon.chap2_string;

import org.apache.commons.lang.ArrayUtils;

public class Split {

	public static void main(String[] args) {
		String test = "One, Two Three, Four Five";
		// 下面两种是一样的。ps：所以regex中取符号【'】得用\'
		System.out.println(ArrayUtils.toString(test.split( "[' '',']" )));
		System.out.println(ArrayUtils.toString(test.split( "[ ,]" )));
		
		String t = "219.242.114.108";
		System.out.println(ArrayUtils.toString(t.split( "[.]" )));
		System.out.println(ArrayUtils.toString(t.split( "\\." )));
		
	}
}
